home *** CD-ROM | disk | FTP | other *** search
- Path: winternet.com!not-for-mail
- From: jdege@winternet.com (Jeff Dege)
- Newsgroups: comp.lang.c++
- Subject: Re: Newbie question ??
- Date: 14 Jan 1996 16:51:09 GMT
- Organization: StarNet Communications, Inc
- Message-ID: <4dbc9t$q0e@blackice.winternet.com>
- References: <4davoi$1vg@peach.america.net>
- NNTP-Posting-Host: subzero.winternet.com
- X-Newsreader: TIN [UNIX 1.3 950726BETA PL0]
-
- On Sun, 14 Jan 1996 13:22:51 GMT, dread (dread@america.net) wrote:
- : I get the following error when I try to rebuild a very simple project
- :
- : LIBC.lib(wincrt0.obj) : error LNK2001: unresolved external symbol
- : "_WinMain@16"
- :
- :
- : here is the code
- :
- : #include <iostream.h>
- : main(){
- : cout << "This is a test";
- : }
- :
- : Using VC++ 2 and win95. Appreciate any help
-
- You're problem is obvious. You're using Windows. It is not possible
- to write a program for the Windows environment in standard C. Most
- notably, programs written for Windows don't start with main(), they
- start with WinMain(), which takes a whole different set of arguments.
- That isn't the only problem, though, because Windows programs don't
- have stdin/cin and stdout/cout, either. Windows doesn't have a command-line
- shell, so you can't write programs that work in one.
-
- You really have two choices. Move to an OS that does have a command-line
- shell, (OS/2, Win/NT, Unix, etc.), or compile your program as an MsDOS
- program.
-
- --
- When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
-
-